<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet" href="bootstrap/css/bootstrap-responsive.min.css" />
<script type="text/javascript" src="bootstrap/js/bootstrap.min.js" ></script>
<title>Insert title here</title>
<style type="text/css">
			table{
				border-spacing: 20px;
			}
			.box2-td{
				text-align: right;
			}
			#text{
				width: 320px;
			}
</style>
</head>
<body style="font-size: 20px;">
	<div class="top" style="padding: 20px 30px 10px; font-size: 16px;">
		<a href="#">商品</a>/
		<a href="#">商品分类管理</a>/
		<span>编辑分类</span>
	</div>
	<div class="bottom">
		<div class="span12" style="width: 96%;">
		<c:if test="${not empty sort}"><form action="goodssort?action=revise" method="post"></c:if>
		<c:if test="${empty sort}"><form action="goodssort?action=add" method="post"></c:if>
			<table class="table">
				<c:if test="${not empty sort}">
					<tr>
						<td style="text-align: right; width: 200px;">分类ID：</td>
						<td><input id="text" type="text" name="id" value="${sort.getId()}" readOnly="true" style="width: 100%;"></td>
					</tr>
				</c:if>
				<tr>
					<td style="text-align: right; width: 200px;">分类名称：</td>
					<td><input id="text" type="text" name="classify" value="${sort.getClassify()}" style="width: 100%;"></td>
				</tr>
				<tr>
					<td style="text-align: right; width: 200px;">上级分类名称：</td>
					<td>
						<c:if test="${empty sort}">
							<select name="last_classify" style="width:100px;">
								<option value="设置分类">设置分类</option>
								<c:forEach items="${list}" var="u" varStatus="vs">
									<option value="${u.id}" ${sort.getLastclassify_id() eq u.id? 'selected = "selected"':''}>${u.classify}</option>
								</c:forEach>
							</select>
						</c:if>
						<c:if test="${not empty sort}">
							<select name="last_classify" style="width:100px;">
								<c:if test="${sort.getLastclassify_id() eq 0}">
									<option value="设置分类">设置分类</option>
								</c:if>
								<c:if test="${sort.getLastclassify_id() ne 0}">
									<c:forEach items="${list}" var="u" varStatus="vs">
										<option value="${u.id}" ${sort.getLastclassify_id() eq u.id? 'selected = "selected"':''}>${u.classify}</option>
									</c:forEach>
								</c:if>
								</select>
						</c:if>
					</td>
				</tr>
				<tr>
					<td style="text-align: right; width: 200px;">是否首页显示：</td>
					<td><input type="radio" name="ifshow" value="0" ${sort.getIfshow() eq 0? 'checked="checked"':''}>是
						<input type="radio" name="ifshow" value="1" ${sort.getIfshow() eq 1? 'checked="checked"':''}>否 
					</td>
				</tr>
				<tr>
					<td style="text-align: right; width: 200px;">排序：</td>
					<td><input id="text" type="text" name="sort" value="${sort.getSort()}" style="width: 100%;"></td>
				</tr>
				<tr>
					<td colspan="2" style="text-align: center;"><input type="submit" value="提交" style="width: 100px;"></td>
				</tr>
			</table>
		</form>
		</div>
	</div>
</body>
</html>